package jpf.nextsearch.util.validation.validator;

import java.util.Collection;

import jpf.nextsearch.util.validation.base.GenericValidator;

import org.hibernate.mapping.Map;

/**
 * @author <a href="mailto:jacek.pruszkowski@gmail.com">Jacek Pruszkowski</a>
 */
public class NotEmptyValidator extends GenericValidator {
	
	@Override
	protected boolean isValueValidInternal(Object value) {
		return !super.isEmpty(value);
	}
	
	@Override
	protected boolean supports(Class<?> klass) {
		return klass.isAssignableFrom(String.class)
				|| klass.isAssignableFrom(Map.class)
				|| klass.isAssignableFrom(Collection.class);
	}
}
